﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConciseMarkupLanguage
{
    static class ExtensionMethods
    {
        public static TRet Aggregate<TRet, TVal>(this IEnumerable<TVal> e, Func<TVal, TRet> seed, Func<TRet, TVal, TRet> func)
        {
            return e.Skip(1).Aggregate(seed(e.First()), func);
        }
    }
}
